import request from '@/utils/request'

// 获取已上课列表
export const learnList = (params) => {
    return request.get('/learn/list-page', { params })
}

// 获取学习详情
export const learnDetail = (params) => {
    return request.get('/learn', { params })
}

// 获取学习记录学后检测的词汇
export const learnRecordWord = (params) => {
    return request.get('/learn/learned-words', { params })
}

// 教练评价
export const teacherComment = (params) => {
    return request.post('/learn/comment', params)
}

// 开始上课
export const startLearn = (params) => {
    return request.post('/learn/start', params)
}

// 结束上课
export const endLearn = (params) => {
    return request.post('/learn/finish', params)
}

//学后检测提交
export const learnSubmit = (params) => {
    return request.post('/learn/record', params)
}

//修改学习课程
export const changeLearnCourse = (params) => {
    return request.put('/learn/course', params)
}

// 获取学前检测词汇
export const getPreStudyWord = (params) => {
    return request.get('/learn/prestudy-word', { params })
}

// 保存学前检测词汇
export const savePrestudyWord = (params) => {
    return request.post('/learn/prestudy-word', params)
}

